Simplify getting the accessible role when checking if an accessible
implementation should present itself; this avoids going through
GtkAccessible twice to get the same data.
gboolean
gtk_accessible_should_present (GtkAccessible *self)
{
+ GtkAccessibleRole role;
GtkATContext *context;
if (GTK_IS_WIDGET (self) &&
!gtk_widget_get_visible (GTK_WIDGET (self)))
return FALSE;
- if (gtk_accessible_get_accessible_role (self) == GTK_ACCESSIBLE_ROLE_NONE ||
- gtk_accessible_get_accessible_role (self) == GTK_ACCESSIBLE_ROLE_PRESENTATION)
+ role = gtk_accessible_get_accessible_role (self);
+ if (role == GTK_ACCESSIBLE_ROLE_NONE ||
+ role == GTK_ACCESSIBLE_ROLE_PRESENTATION)
return FALSE;
context = gtk_accessible_get_at_context (self);